<?php
/**
 * ExtCycleButtonBase class file.
 *
 * @author TrueSoftware B.V. (The Netherlands)
 * @link http://www.ext4yii.com
 * @copyright Copyright 2007-2010 TrueSoftwareB.V. all rights reserved.
 * @license http://www.ext4yii.com/license/
 *          EVALUATION VERSION - NOT FOR COMMERCIAL USE OR DISTRIBUTION.
 * @version 0.7.2
 */

class ExtCycleButtonBase extends ExtSplitButton
{
    private $_items_class_types = array('ExtMenuCheckItem');

    public function parseNode(ExtHTMLParserNode $node,
        ExtASTWalker $astwalker)
    {
        parent::parseNode($node, $astwalker);
        $this->parseItems($node, $astwalker);
    }

    private function parseItems($node,$astwalker)
    {
        $citems = $node->findPropertyByName('menuitems');
        if(!is_null($citems))
        {
            $items=parent::parseNodeWidthTag($citems,
                $astwalker,
                true,
                array('asobject'=>false),
                $this,
                $this->_items_class_types);
            $this->setArrayConfig('items', $items);
            $citems->shiftUp();
        }
    }
}
?>
